import time
from selenium import webdriver
from selenium.webdriver import ActionChains, Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait

driver = webdriver.Edge()
driver.get("http://www.baidu.com")
time.sleep(3)

b = driver.find_element(By.ID,"chat-textarea")
b.send_keys("javascript")

# 获取发送内容 键盘全选
b.send_keys(Keys.CONTROL,"A")

# 复制
b.send_keys(Keys.CONTROL,"C")

# 粘贴
b.send_keys(Keys.CONTROL,"V")

b.send_keys(Keys.ENTER)

time.sleep(100)